package com.wjw.dependenceinversion.inversion01;

/**
 * TODO: 描述
 *
 * @author ikaros
 * @date 2024/7/8 0:21
 * @see <a href="ikaros@qq.com">mailTo: ikaros@qq.com</a>
 */
public class Switch {
    public static void main(String[] args) {
        Switch swi = new Switch();
        swi.execute(new Light());
    }

    public void execute(Light light) {
        light.turnOn();
        System.out.println("开了");
        light.turnOff();
        System.out.println("关了");
    }
}
